<?php
namespace app\controller;

use app\BaseController;

class Index extends BaseController
{
    public function index()
    {
        return view();
    }

    public function hello()
    {
        $post = $this->request->post();
        $file = $this->request->file('file');
        try{
            $upload = new Upload($file->getPathname(),$post['blob_num'],$post['total_blob_num'],$post['file_name']);
            $upload->apiReturn();
        }catch (\Exception $e) {
//            halt($e->getMessage());
        }

        exit;

        halt($file);
        $fileName = \think\facade\Filesystem::disk("public")->putFile( 'upload/video', $file);
        halt($fileName);
    }

}
